# sprite = codesters.Rectangle(x, y, width, height, "color")
start = codesters.Rectangle(0, 0, 100, 50, "blue")
# sprite = codesters.Rectangle(x, y, width, height, "color")
finish = codesters.Rectangle(0, 0, 100, 50, "blue")
t = codesters.Teacher()
rects = t.find_function("Rectangle")
try:
tval1 = rects[0][1].lower().replace(' ','')
except:
tval1 = "DNE"
try:
tval2 = rects[1][1].lower().replace(' ','')
except:
tval2 = "DNE"
t1 = TestObjective()
t1.add_success('(0,-250,500,50,"red")' in tval1, "Great Job!")
t1.add_failure(tval1 == "DNE", "Oops, did you delete the rectangles?")
t1.add_failure(tval1 != "DNE" and '(0,-250' not in tval1, "Did you change the y argument for start to -250?")
t1.add_failure(tval1 != "DNE" and ',500,50' not in tval1, "Did you change the width for start to 500?")
t1.add_failure(tval1 != "DNE" and '50,"red")' not in tval1, 'Did you change the color for start to "red"?')
t2 = TestObjective()
t2.add_success('(0,250,500,50,"green")' in tval2, "Great Job!")
t2.add_failure(tval2 == "DNE", "Oops, did you delete a rectangle?")
t2.add_failure(tval2 != "DNE" and '(0,250' not in tval2, "Did you change the y argument for finish to 250?")
t2.add_failure(tval2 != "DNE" and ',500,50' not in tval2, "Did you change the width for finish to 500?")
t2.add_failure(tval2 != "DNE" and '50,"green")' not in tval2, 'Did you change the color for finish to "green"?')
tester = TestManager()
tester.add_test_list([t1, t2])
tester.run_tests()
tester.display_first_feedback()